﻿<!DOCTYPE html>
<html> 
  <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
   <!--The viewport meta tag is used to improve the presentation and behavior of the samples 
      on iOS devices-->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
    <title>WMSlayer</title> 

  <link rel="stylesheet" type="text/css" href="http://localhost:8080/testA/arcgisjs/js/dojo/dijit/themes/tundra/tundra.css" />
    <script type="text/javascript" src="http://localhost:8080/testA/arcgisjs/init.js"></script>
    <script type="text/javascript" src="http://localhost:8080/testA/arcgisjs/jsapi_vsdoc12_v38.js"></script>
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/testA/arcgisjs/js/esri/css/esri.css" />
    <style>
      html, body, #map {
        height: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
      }
      body {
        background-color: #FFF;
        overflow: hidden;
        font-family: "Trebuchet MS";
      }
    </style>
  
    
    <script>
        var map;

        require(["esri/map", "esri/layers/WMSLayer", "esri/config", "dojo/domReady!"],
          function (Map, WMSLayer, esriConfig) {

              esriConfig.defaults.io.proxyUrl = "/proxy/";

              map = new Map("map", {
                  basemap: "streets",
                  center: [-98, 37],
                  zoom: 5
              });

              var wmsLayer = new WMSLayer("http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer", {
                  format: "png",
                  visibleLayers: [2]
              });

              map.addLayer(wmsLayer);
          });
    </script> 
  </head> 
  
  <body> 
      <div id="map">
      </div>
  </body> 
</html>